﻿package src{
	import flash.display.*;
	import flash.events.*;
	import flash.geom.*;
	import flash.net.*;
	import flash.text.*;
	import flash.ui.*;
	import flash.utils.*;

	import org.papervision3d.lights.*;
	import org.papervision3d.objects.*;
	import org.papervision3d.objects.primitives.*
	import org.papervision3d.materials.*;
	import org.papervision3d.materials.shadematerials.*;
	import org.papervision3d.core.geom.*;
	import org.papervision3d.core.geom.renderables.*;

	public final class PP extends DisplayObject3D {
		private var config:Object = CP.config;
		public function PP():void {
			draw();
			CP.addEventListener(E.RESIZE,resizeHandler);
		}
		
		private function draw():void {
			var pl:PointLight3D = new PointLight3D();
			//pl.x =  0;
            pl.y = 1000;
			//pl.z =  0;
			//trace(pl.x + "|" + pl.y + "|" + pl.z);
			
			//
			var mate:FlatShadeMaterial = new FlatShadeMaterial(pl, 0xcccccc, 0x333333, 0);
            var paper:PaperPlane = new PaperPlane(mate, 2);
            paper.material.doubleSided = true;
            addChild(paper);
			
		}
		
		//========================================================
		private function resizeHandler(e:E=null):void {

		}

	}
}